var prefix = "/fin/billing"


function exportData() {
    var url =prefix + '/exportData';
    var itmid=$('#searchName').val();
    if(itmid != null){
        if (url.indexOf('?') > -1) {
            url += '&itmid=' + itmid;
        } else {
            url += '?itmid=' + itmid;
        }
    }
    console.log(url);
    var form = document.createElement('form');
    form.setAttribute('action', url);
    form.setAttribute('method', 'post');
    form.setAttribute('style', 'display:none');
    document.body.appendChild(form);
    form.submit();
    document.body.removeChild(form)
}